@using System.Text.Encodings.Web
@using Abp.Timing
@using JYJ.AiYard.Extension
 <!-- Topbar -->
<div class="container u-header__hide-content pt-2">
    <div class="d-flex align-items-center">
        <!-- Language -->
        <div class="position-relative">
            
                <a id="languageDropdownInvoker" class="dropdown-nav-link dropdown-toggle d-flex align-items-center" href="javascript:;" role="button"
                   aria-controls="languageDropdown"
                   aria-haspopup="true"
                   aria-expanded="false"
                   data-unfold-event="hover"
                   data-unfold-target="#languageDropdown"
                   data-unfold-type="css-animation"
                   data-unfold-duration="300"
                   data-unfold-delay="300"
                   data-unfold-hide-on-scroll="true"
                   data-unfold-animation-in="slideInUp"
                   data-unfold-animation-out="fadeOut">
                    <i class="dropdown-item-icon @(Model.CurrentLanguage.Icon)"   alt="@Model.CurrentLanguage.Name"></i>
                    <span class="d-inline-block d-sm-none">@Model.CurrentLanguage.Name</span>
                    <span class="d-none d-sm-inline-block">@Model.CurrentLanguage.DisplayName</span>
                </a>
                <div id="languageDropdown" class="dropdown-menu dropdown-unfold" aria-labelledby="languageDropdownInvoker">


                    @foreach (var language in Model.Languages)
                    {
                        if (Model.CurrentLanguage.Name == language.Name)
                        {
                            <a class="dropdown-item active" href="#" alt="@language.Name"> @language.DisplayName</a>

                            continue;
                        }

                        <a class="dropdown-item" href="~/AbpLocalization/ChangeCulture?cultureName=@(language.Name)&returnUrl=@(UrlEncoder.Default.Encode(Context.Request.Path + Context.Request.QueryString))"
                           alt="@language.Name"> @language.DisplayName
                        </a>

                    }

                </div>

            
            
          

        </div>
        <!-- End Language -->
        
        <div class="position-relative  ml-auto" >
            <a id="Wechat_public_jiaoluo" class=" u-header__navbar-link" href="javascript:;" role="button"
               aria-controls="Wechat_public_jiaoluoDropdown"
               aria-haspopup="true"
               aria-expanded="false"
               data-unfold-event="hover"
               data-unfold-target="#Wechat_public_jiaoluoDropdown"
               data-unfold-type="css-animation"
               data-unfold-duration="300"
               data-unfold-delay="300"
               data-unfold-hide-on-scroll="true"
               data-unfold-animation-in="slideInUp"
               data-unfold-animation-out="fadeOut">
                <span class="fab fa-weixin dropdown-item-icon"></span>
                 <span class="d-none d-sm-inline-block">角落的白板报</span>
            </a>
            <div id="Wechat_public_jiaoluoDropdown" class="dropdown-menu dropdown-unfold   text-center " aria-labelledby="Wechat_public_jiaoluo" style="min-width: 250px;">
                <img src="~/imgs/common/web_wechat_QR.jpg"  style="max-width: 180px;" title="微信公众号：角落的白板报" alt="微信公众号：角落的白板报" />
 
                <span class="d-block">【推荐】关注我们</span>
            </div>
 

        </div>
        

        <div class="ml-auto">
            @*<!-- Jump To -->
            <div class="d-inline-block d-sm-none position-relative mr-2">
                <a id="jumpToDropdownInvoker" class="dropdown-nav-link dropdown-toggle d-flex align-items-center" href="javascript:;" role="button"
                   aria-controls="jumpToDropdown"
                   aria-haspopup="true"
                   aria-expanded="false"
                   data-unfold-event="hover"
                   data-unfold-target="#jumpToDropdown"
                   data-unfold-type="css-animation"
                   data-unfold-duration="300"
                   data-unfold-delay="300"
                   data-unfold-hide-on-scroll="true"
                   data-unfold-animation-in="slideInUp"
                   data-unfold-animation-out="fadeOut">
                  导航至
                </a>

                <div id="jumpToDropdown" class="dropdown-menu dropdown-unfold" aria-labelledby="jumpToDropdownInvoker">
                    <a class="dropdown-item" href="javascript:void(0)">帮助中心</a>
                    <a class="dropdown-item" href="javascript:void(0)">联系我们</a>
                </div>
            </div>
            <!-- End Jump To -->
            <!-- Links -->
            <div class="d-none d-sm-inline-block ml-sm-auto">
                <ul class="list-inline mb-0">
                    <li class="list-inline-item mr-0">
                        <a class="u-header__navbar-link" href="javascript:void(0)">帮助中心</a>
                    </li>
                    <li class="list-inline-item mr-0">
                        <a class="u-header__navbar-link" href="javascript:void(0)">联系我们</a>
                    </li>
                </ul>
            </div>
            <!-- End Links -->*@
        </div>

        <ul class="list-inline ml-2 mb-0">

            @if (AbpSession.UserId.HasValue)
            {
               
                <!-- Account Login -->
                <li class="list-inline-item">
                    <!-- Account Sidebar Toggle Button -->
                    <a id="sidebarNavToggler" class="btn btn-xs btn-text-secondary u-sidebar--account__toggle-bg ml-1" href="javascript:;" role="button"
                       aria-controls="sidebarContent"
                       aria-haspopup="true"
                       aria-expanded="false"
                       data-unfold-event="click"
                       data-unfold-hide-on-scroll="false"
                       data-unfold-target="#sidebarContent"
                       data-unfold-type="css-animation"
                       data-unfold-animation-in="fadeInRight"
                       data-unfold-animation-out="fadeOutRight"
                       data-unfold-duration="500">
                        <span class="position-relative">
                            <span class="u-sidebar--account__toggle-text">@AbpSession.GetUserName()</span>
                             
                            <img class="u-sidebar--account__toggle-img" src="@Url.Action("GetProfilePicture", "Profile", new { area = string.Empty })?t=@Clock.Now.Ticks.ToString()" alt="个人头像">
                            @*<span class="badge badge-sm badge-success badge-pos rounded-circle">3</span>*@
                         
                        </span>
                    </a>
                    <!-- End Account Sidebar Toggle Button -->
                </li>
                <!-- End Account Login -->
                <li class="list-inline-item  ">                     
                    <a class="btn btn-xs   btn-text btn-text-secondary   u-sidebar--account__toggle-bg" role="button" href="@Url.Action("Logout","Account")">注销</a>
                </li>

            }
            else
            {
                <!-- Account Login -->
                <li class="list-inline-item">
                    <a class="link" href="@Url.Action("Login","Account")">
                      
                          
                            <i class="fas fa-user-circle "></i>
                           
                        登录
                        
                    </a>
                    
                    @*<a class="btn btn-xs   btn-text btn-text-secondary   u-sidebar--account__toggle-bg" href="@Url.Action("Login","Account")">  <span class="fas fa-user-circle btn-icon__inner font-size-1"></span>content</a>*@


                    <!-- Account Sidebar Toggle Button -->
                    @*<a id="sidebarNavToggler" class="btn btn-xs btn-icon btn-text-secondary" href="javascript:;" role="button"
           aria-controls="sidebarContent"
           aria-haspopup="true"
           aria-expanded="false"
           data-unfold-event="click"
           data-unfold-hide-on-scroll="false"
           data-unfold-target="#sidebarContent"
           data-unfold-type="css-animation"
           data-unfold-animation-in="fadeInRight"
           data-unfold-animation-out="fadeOutRight"
           data-unfold-duration="500">
            <span class="fas fa-user-circle btn-icon__inner font-size-1"></span>
        </a>*@
                    <!-- End Account Sidebar Toggle Button -->
                </li>
                <!-- End Account Login -->

            }
        </ul>
    </div>
</div>
<!-- End Topbar -->